//职位管理有内容
import React, {Component} from 'react'
import {Image, Text, TouchableOpacity, View,} from 'react-native';

import {Cdeliverlist_Style as styles} from '../../../../styles';
import Icon from 'react-native-vector-icons/Ionicons';
import {common_url, fetchRequest} from "../../../util/fetch";

let Dimensions = require('Dimensions');
let width = Dimensions.get('window').width;

export default class Cdeliver_list extends Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <TouchableOpacity style={styles.bro_all} activeOpacity={1}
                              onPress={() => {
                                  this.props.navigation.navigate('Cresume_all', {
                                      resumeId: this.props.resume.resumeId,
                                      sendId: this.props.sendId,
                                      postionId: this.props.postionId
                                  });
                                  fetchRequest('PostionSend/updateState1.go', 'POST', {sendId: this.props.sendId}).then(ret => {
                                  });
                              }}>
                <View style={styles.bro_left}>
                    <Image source={
                        this.props.resume.resumeIntentField ?
                            {uri: common_url + "uploadImg/" + this.props.resume.resumeIntentField}
                            : require('../../../img/app/boy.png')} style={styles.bro_head}/>
                    <Text style={styles.bro_name}>{this.props.resume.resumeName}</Text>
                </View>

                <View style={styles.bro_right}>

                    <View style={styles.bro_eve1}>
                        <Text style={styles.bro_pos}>{this.props.resume.resumeIntentPosition}</Text>
                        {this.props.resume.resumeSex === 1 ?
                            < Icon
                                name={'md-male'}
                                size={15}
                                color={'#3d9ccc'} style={styles.bro_icon}/>
                            :
                            <Icon
                                name={'md-female'}
                                size={15}
                                color={'#fc6866'} style={styles.bro_icon}/>
                        }
                    </View>


                    <View style={styles.bro_eve3}>
                        <Text style={styles.bro_area}>{this.props.resume.resumeWorkspace}</Text>
                        <Text
                            style={styles.bro_area}>{(new Date().getFullYear() - this.props.resume.resumeWorkinglife)}年工作经验</Text>
                        <Text style={styles.bro_area}>{
                            this.props.resume.xzResumeEducations[0] !== undefined ?
                                this.props.resume.xzResumeEducations[0].educationLevel
                                : '无学历'
                        }</Text>
                    </View>

                    <View style={[styles.bro_eve4, {width: width * 0.7}]}>
                        <Text style={styles.bro_time}>投递时间：{this.props.time}</Text>
                    </View>

                </View>
            </TouchableOpacity>
        )
    }
}